It is often desirable to determine the size of media that is input into a printing device, for example to ensure that the printing device can process the media, to identify mismatch between a size identified by the user and that detected by the printing device, to control the manner in which print images are applied to the media. In many printing devices, the length of the media is measured near the beginning of the media path using an encoder that counts the number of whole and fractional revolutions of a drive roller within the printing device that drives the media along the device's media path. For instance, once a leading edge of a sheet of media is detected, the number of revolutions through which the drive roller rotates until a trailing edge of the sheet is detected is counted. Given that the circumference or diameter of the drive roller is presumed known, the length of the sheet can be determined from the number of revolutions.
Many printing device drive rollers are made of materials that wear during use. For example, such drive rollers may comprise a rubber outer layer that grips the media to avoid slippage of the media along the media path. In such cases, the size of the drive roller may change over time. Specifically, the circumference and diameter of the drive roller can become smaller over time. Because the media length determination is made relative to a presumed roller circumference or diameter, changes in actual roller circumference or diameter can lead to inaccurate media length determinations. Although such inaccuracy may be relatively small in an absolute sense, it is important to identify the length of the media with high precision since several different sizes of media having similar lengths may be used with the printing device and must be distinguished from each other.